After completing this lesson, you'll be able to:
In this lesson, you will:
After completing this lesson, you'll be able to:
In this lesson, you will:
If you're taking a live Safe Software-hosted training course or using an on-demand lab for this course, we've already imported the content for this lesson into your FME Flow.
If you're completing this lesson with your own FME Flow, you must import the starting project with the content into your FME Flow.
See FME Flow Authoring: Instructions to Import the Starting Project for directions to import the project to your own FME Flow.
Currently, FME Flow limits workspace apps to one workspace and one service at a time. In specific scenarios, you may want to run a workspace app with multiple services, run multiple workspaces in sequence, or conditionally run other FME workflows depending on results from your app. FME Flow offers numerous features that let you link workspaces and apps for seamless processing.
| Feature | Common Functions | How to set it up |
|
Run one workspace through two services by chaining two apps. Pass the values a user entered in one app straight into the next, through the app URL. |
On the receiving app, turn on Enable Dynamic Parameters and Enable URL-Based Configuration, and list what the URL may set under Allowed Parameters. Turn on Run Immediately so it runs without a second form. Build the link in the first workspace's output, with the value URL-encoded. |
|
|
Run multiple workspaces in sequence or in parallel. Run workspaces conditionally based on results or data from previous workspaces or app inputs. Trigger additional workflows with FME Flow System Events and Topics external actions. |
Build an automation that starts with a Manual Trigger — an automation without one cannot be run from an app. Create the app from Flow Apps > Automation Apps tab. See Job Orchestration in Automations or Create No-Code Web Apps for training content on how to create automation apps. |
|
|
Make API calls to FME Flow to retrieve data and information. Trigger and run FME workflows from external applications or from workspaces. Link within workspace apps to run other workflows or send data to FME Flow. |
Find the endpoint in the REST API documentation at Call it from the workspace with an HTTPCaller or OpenAPICaller, referencing a user parameter for anything the app user chooses. |
|
|
Run workspaces programmatically from third-party applications, web browsers, or other workspaces. Link from workspace app results to run a second workspace with app user inputs, or with a different service than the app. |
Configure the workspace on the Run Workspace page, then open Workspace Actions and select Create Webhook. Set the parameters the webhook will run with, then click Create. Copy the URL and its token straight away — it is shown only once. |
You can use the FME Flow REST API to run or enable additional workflows on FME Flow from within a workspace that is running as an app. First, locate the API endpoint you wish to use in the FME Flow REST API documentation, which you can find at http://<your FME Flow host>/fmeapiv4/docs/index.html. For example, to enable or disable a schedule on your FME Flow from a workspace app, you would use the PUT /schedules/{id}/enabled endpoint.

The endpoint takes a single parameter: the schedule ID. You can configure your workspace to enable or disable a single schedule, or use a user parameter to select which schedule to enable or disable in your FME Flow. Create a Choice parameter to select the schedule name, and have it reference the ID.

Then, reference the parameter from the transformer that makes the API request in your workspace. The most common transformers for this purpose are the HTTPCaller and OpenAPICaller.

From a workspace app, the user sees only the schedule names in the Choice parameter. When they run the app, the workspace calls FME Flow to enable or disable the selected schedule.

A Webhook URL runs a workspace directly, without an app in front of it. You configure the workspace on the Run Workspace page, then open Workspace Actions and select Create Webhook instead of clicking Run.

FME Flow prompts you to configure the webhook and its parameters. When you change a parameter, the URL updates to reflect it. You can always use the parameters to run the workspace set here, or you may alter the URL directly and use the webhook URL to run the workspace with different parameter selections.
FME Flow shows two URLs: one with an authorization header and one with a query string, along with a token that grants permission to run the workspace. This is your only chance to download that information, so copy it before you leave the page.

Because a webhook runs a workspace rather than an app, it is the right tool when no app is involved at all: a third-party system, a scheduled script, or another workspace that needs to start this one. Its parameter values are fixed when you create it, so each distinct set of values is a separate webhook.
For linking one app to another, an app URL is usually the better choice. A webhook fixes its parameters when you create it and carries a token; an app URL takes its values at the moment it is opened, and what it may set is governed by Allowed Parameters.
The content used in this lesson builds on the previous lesson. To do this exercise, continue with your workspace app from the exercise in Set Parameters with Query Strings.

Frank, a GIS Administrator, has a download app that takes a neighborhood from its URL. Colleagues still ask for the wrong neighborhood, download the data, and then ask again. He wants them to see the licenses first and download only once they know what they want, which means reaching two transformation services from one FME Flow workflow.
In this exercise, you will:

West End reaches the download app as West%20End rather than as an invalid URL.<your app URL>.
<your app URL>.
http://localhost/fmeserver/apps/vendor-businesses-data-download?dynamicParameterData=%5B%7B%22name%22%3A%22NEIGHBORHOOD%22%2C%22defaultValue%22%3A%22West%20End%22%7D%5D<p><a href="http://localhost/fmeserver/apps/vendor-businesses-data-download?dynamicParameterData=%5B%7B%22name%22%3A%22NEIGHBORHOOD%22%2C%22defaultValue%22%3A%22West%20End%22%7D%5D">Download Excel Sheet</a></p>

http://localhost/fmeserver/apps/vendor-businesses-data-download?dynamicParameterData=%5B%7B%22name%22%3A%22NEIGHBORHOOD%22%2C%22defaultValue%22%3A%22@Value(neighborhood)%22%7D%5D.







You've now built two FME Flow apps, one to preview the data, and one to download the data immediately. You can use multiple FME Flow transformation services from a single workspace app form with a one-button click from the data streaming output HTML. This workflow will help Frank save time fulfilling food vendor business license data, while allowing his colleagues to make selections and preview their data before downloading it.
If you're taking a live Safe Software-hosted training course or using an on-demand lab for this course, we've already imported the content for this lesson into your FME Flow.
If you're completing this lesson with your own FME Flow, you must import the starting project with the content into your FME Flow.
See FME Flow Authoring: Instructions to Import the Starting Project for directions to import the project to your own FME Flow.
Currently, FME Flow limits workspace apps to one workspace and one service at a time. In specific scenarios, you may want to run a workspace app with multiple services, run multiple workspaces in sequence, or conditionally run other FME workflows depending on results from your app. FME Flow offers numerous features that let you link workspaces and apps for seamless processing.
| Feature | Common Functions | How to set it up |
|
Run one workspace through two services by chaining two apps. Pass the values a user entered in one app straight into the next, through the app URL. |
On the receiving app, turn on Enable Dynamic Parameters and Enable URL-Based Configuration, and list what the URL may set under Allowed Parameters. Turn on Run Immediately so it runs without a second form. Build the link in the first workspace's output, with the value URL-encoded. |
|
|
Run multiple workspaces in sequence or in parallel. Run workspaces conditionally based on results or data from previous workspaces or app inputs. Trigger additional workflows with FME Flow System Events and Topics external actions. |
Build an automation that starts with a Manual Trigger — an automation without one cannot be run from an app. Create the app from Flow Apps > Automation Apps tab. See Job Orchestration in Automations or Create No-Code Web Apps for training content on how to create automation apps. |
|
|
Make API calls to FME Flow to retrieve data and information. Trigger and run FME workflows from external applications or from workspaces. Link within workspace apps to run other workflows or send data to FME Flow. |
Find the endpoint in the REST API documentation at Call it from the workspace with an HTTPCaller or OpenAPICaller, referencing a user parameter for anything the app user chooses. |
|
|
Run workspaces programmatically from third-party applications, web browsers, or other workspaces. Link from workspace app results to run a second workspace with app user inputs, or with a different service than the app. |
Configure the workspace on the Run Workspace page, then open Workspace Actions and select Create Webhook. Set the parameters the webhook will run with, then click Create. Copy the URL and its token straight away — it is shown only once. |
You can use the FME Flow REST API to run or enable additional workflows on FME Flow from within a workspace that is running as an app. First, locate the API endpoint you wish to use in the FME Flow REST API documentation, which you can find at http://<your FME Flow host>/fmeapiv4/docs/index.html. For example, to enable or disable a schedule on your FME Flow from a workspace app, you would use the PUT /schedules/{id}/enabled endpoint.

The endpoint takes a single parameter: the schedule ID. You can configure your workspace to enable or disable a single schedule, or use a user parameter to select which schedule to enable or disable in your FME Flow. Create a Choice parameter to select the schedule name, and have it reference the ID.

Then, reference the parameter from the transformer that makes the API request in your workspace. The most common transformers for this purpose are the HTTPCaller and OpenAPICaller.

From a workspace app, the user sees only the schedule names in the Choice parameter. When they run the app, the workspace calls FME Flow to enable or disable the selected schedule.

A Webhook URL runs a workspace directly, without an app in front of it. You configure the workspace on the Run Workspace page, then open Workspace Actions and select Create Webhook instead of clicking Run.

FME Flow prompts you to configure the webhook and its parameters. When you change a parameter, the URL updates to reflect it. You can always use the parameters to run the workspace set here, or you may alter the URL directly and use the webhook URL to run the workspace with different parameter selections.
FME Flow shows two URLs: one with an authorization header and one with a query string, along with a token that grants permission to run the workspace. This is your only chance to download that information, so copy it before you leave the page.

Because a webhook runs a workspace rather than an app, it is the right tool when no app is involved at all: a third-party system, a scheduled script, or another workspace that needs to start this one. Its parameter values are fixed when you create it, so each distinct set of values is a separate webhook.
For linking one app to another, an app URL is usually the better choice. A webhook fixes its parameters when you create it and carries a token; an app URL takes its values at the moment it is opened, and what it may set is governed by Allowed Parameters.
The content used in this lesson builds on the previous lesson. To do this exercise, continue with your workspace app from the exercise in Set Parameters with Query Strings.

Frank, a GIS Administrator, has a download app that takes a neighborhood from its URL. Colleagues still ask for the wrong neighborhood, download the data, and then ask again. He wants them to see the licenses first and download only once they know what they want, which means reaching two transformation services from one FME Flow workflow.
In this exercise, you will:

West End reaches the download app as West%20End rather than as an invalid URL.<your app URL>.
<your app URL>.
http://localhost/fmeserver/apps/vendor-businesses-data-download?dynamicParameterData=%5B%7B%22name%22%3A%22NEIGHBORHOOD%22%2C%22defaultValue%22%3A%22West%20End%22%7D%5D<p><a href="http://localhost/fmeserver/apps/vendor-businesses-data-download?dynamicParameterData=%5B%7B%22name%22%3A%22NEIGHBORHOOD%22%2C%22defaultValue%22%3A%22West%20End%22%7D%5D">Download Excel Sheet</a></p>

http://localhost/fmeserver/apps/vendor-businesses-data-download?dynamicParameterData=%5B%7B%22name%22%3A%22NEIGHBORHOOD%22%2C%22defaultValue%22%3A%22@Value(neighborhood)%22%7D%5D.







You've now built two FME Flow apps, one to preview the data, and one to download the data immediately. You can use multiple FME Flow transformation services from a single workspace app form with a one-button click from the data streaming output HTML. This workflow will help Frank save time fulfilling food vendor business license data, while allowing his colleagues to make selections and preview their data before downloading it.